<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		
	</head>
	<body>
		<div id="demo1" class="xm-select-demo"></div>
		<button class="btn" id="demo1-getValue">获取选中值</button>
		<pre id="demo1-value"></pre>
		
		
		
		
		<script src="../js/xm-select.js"></script> 
		
		<script>
		var demo1 = xmSelect.render({
			el: '#demo1', 
			language: 'zn',
			data: [
				{name: '张三', value: 1},
				{name: '李四', value: 2},
				{name: '王五', value: 3},
			]
		})
		
		document.getElementById('demo1-getValue').onclick = function(){
			//获取当前多选选中的值
			var selectArr = demo1.getValue();
			document.getElementById('demo1-value').innerHTML = JSON.stringify(selectArr, null, 2);
		}
		</script>
	</body>
</html>
